<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2023/5/11
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath()+"/";%>
<html>
<head>
    <base href="<%=path%>">
    <title>资源列表</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <link rel="stylesheet" href="https://unpkg.com/@fortawesome/fontawesome-free@5.12.1/css/all.min.css">
    <link href="https://cdn.jsdelivr.net/npm/jquery-treegrid@0.3.0/css/jquery.treegrid.css" rel="stylesheet">
    <link href="https://unpkg.com/bootstrap-table@1.21.2/dist/bootstrap-table.min.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.6.3.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->

    <script src="https://cdn.jsdelivr.net/npm/jquery-treegrid@0.3.0/js/jquery.treegrid.min.js"></script>
    <script src="https://unpkg.com/bootstrap-table@1.21.2/dist/bootstrap-table.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
    <script src="https://unpkg.com/bootstrap-table@1.21.2/dist/extensions/treegrid/bootstrap-table-treegrid.min.js"></script>
</head>
    <style>
    .a{
        background-color: #0d8ddb;
    }
</style>
<body>

<div>
    <form method="get" action="user/list" id="searchForm">
        登录名:<input type="text" name="loginName" >
        手机号:<input type="text" name="mobiile" >
        部门状态:
        <select name="status">
            <option value="-1">全部</option>
            <option value="0"  >启用</option>
            <option value="1" >停用</option>
        </select>
        创建时间:<input type="text" name="gmtCreate" >--
        <input type="text"  name="gmtModified"/>
        <button class="btn btn-primary" type="button" onclick="$.table.search()">搜索</button>
        <button class="btn btn-primary" type="button" onclick="$.table.reset()">重置</button>
    </form>
</div>
<table id="table">
</table>
<div id="toolbar" style="padding-left:5px;">
    <button class="btn btn-primary" onclick="$.modal.openWin('新增用户信息','user/toEdit','500px','500px');"><span class="glyphicon glyphicon-plus"></span>新增</button>
    <button class="btn btn-warning" onclick="$.operator.deletes('user/deletes');"><span class="glyphicon glyphicon-trash"></span>批量删除</button>
    <button class="btn btn-warning" onclick="zk();"><span class="glyphicon glyphicon-trash"></span>展开</button>
    <button class="btn btn-warning" onclick="zd();"><span class="glyphicon glyphicon-trash"></span>折叠</button>
</div>
</body>
<script src="hplus/js/plugins/layer/layer.min.js" type="text/javascript"></script>
<script src="hplus/js/sofwin.js"></script>
<script>
    var  $table = $("#table");
    function zk(){
        $table.bootstrapTable('expandAllRows',true);
    }
    function zd(){
        $table.bootstrapTable('collapseAllRows',true);
    }
    $(function() {

        var columns =[{
            field: 'name',
            title:'资源名称'
        },{
            field:'url',
            title:'资源路径'
        }];
        $.table.initTableGrid(columns,'resource/data','id','name','parentId','0');
    })
</script>
</html>
